package com.question.java.decimal;

import java.math.BigDecimal;
import java.text.DecimalFormat;

/**
 * @Description:
 * @Author: Jun Yang
 * @Time: 2019/1/24 下午7:47
 * @Version: 1.0
 */
public class DecimalMain {
    public static void main(String[] args) {
        DecimalFormat df = new DecimalFormat("0.00");
        System.out.println(df.format(BigDecimal.valueOf(3).setScale(2, BigDecimal.ROUND_UP)));
    }
}
